#include <time.h>
#include <QDebug>
#include "screenthread.h"

ScreenThread::ScreenThread(QWidget *s)
{
    screen = s;
}

void ScreenThread::run()
{
    clock_t start, end;
    double totalTime;
    start = clock();

    w = new ScreenWidget(screen);
    w->showFullScreen();

    end = clock();
    totalTime = (double) (end-start)/(double)CLOCKS_PER_SEC;
//    qDebug() << "Time spent on opening a thread and window is" << totalTime;
}

ScreenWidget * ScreenThread::getScreenWidget()
{
    return w;
}

//void ScreenThread::refresh()
//{
//    w->drawWindow();
//}
